<template>
	<zkView ref="zkView" v-slot:uContainer>
		<view class="container">
			<view class="chartBox">
				<view class="title">
					<text>近七日</text>
				</view>
				<view class="chart">
					<qiun-data-charts type="mix" :opts="opts" :chartData="chartData" />
				</view>
			</view>
			<view class="actionBox">
				<view class="title">
					<text>订单管理</text>
				</view>
				<view class="action">
					<view class="actionItem" @click="toALL">
						<uni-icons type="flag" size="30"></uni-icons>
						<text>全部订单</text>
					</view>
					<view class="actionItem" @click="toShipping">
						<uni-icons type="undo" size="30"></uni-icons>
						<text>发货处理</text>
					</view>
					<view class="actionItem" @click="toDo">
						<uni-icons type="loop" size="30"></uni-icons>
						<text>退换处理</text>
					</view>
				</view>
			</view>
			<view class="actionBox">
				<view class="title">
					<text>产品管理</text>
				</view>
				<view class="action">
					<view class="actionItem" @click="toDo">
						<uni-icons type="compose" size="30"></uni-icons>
						<text>产品维护</text>
					</view>
					<view class="actionItem" @click="toDo">
						<uni-icons type="plusempty" size="30"></uni-icons>
						<text>产品上新</text>
					</view>
				</view>
			</view>
			<view class="actionBox">
				<view class="title">
					<text>其它</text>
				</view>
				<view class="action">
					<view class="actionItem" @click="doDataScript">
						<uni-icons type="locked" size="30"></uni-icons>
						<text>数据脚本</text>
					</view>
				</view>
			</view>
		</view>
	</zkView>
</template>
<script>
	import indexJs from './index.js';
	import moment from 'moment/moment.js';
	export default {
		components: {},
		computed: {
			dateMoment() {
				return (dateStr) => dateStr ?
					moment(dateStr).format('YYYY-MM-DD HH:mm:ss') :
					'--'
			},
		},
		...indexJs
	};
</script>

<style lang="scss" scoped>
	@import './index.scss';
</style>